<?php

namespace App\Models;
class Balance extends Base
{
    protected $table = 'balance';
    const TYPE_ID_CARD = 1;
    const TYPE_ARTICLE = 2;
    const TYPE_STAR = 3;
    const TYPE_COMMENT = 4;
    const TYPE_FOCUS = 5;
    const TYPE_SHARE = 6;
    const TYPE_SIGN_IN = 7;
    const TYPE_BUY_PRODUCT = 8;
    const TYPE_WATCH_VIDEO = 9;

    const POINT_ID_CARD = 10;
    const POINT_ARTICLE = 10;
    const POINT_STAR = 5;
    const POINT_COMMENT = 5;
    const POINT_FOCUS = 10;
    const POINT_SHARE = 10;
    const POINT_WATCH_VIDEO = 30;

    public function user() {
        return $this->belongsTo(User::class, 'user_id');
    }

}
